@extends('layouts.app')

@section('content')

<div class="container">
  <div class="col-md-10 offset-md-1">
    <div class="card ">

      <div class="card-header">
        <h1>
          Tag /
          @if($tag->id)
            Edit #{{ $tag->id }}
          @else
            Create
          @endif
        </h1>
      </div>

      <div class="card-body">
        @if($tag->id)
          <form action="{{ route('tags.update', $tag->id) }}" method="POST" accept-charset="UTF-8">
          <input type="hidden" name="_method" value="PUT">
        @else
          <form action="{{ route('tags.store') }}" method="POST" accept-charset="UTF-8">
        @endif

          @include('common.error')

          <input type="hidden" name="_token" value="{{ csrf_token() }}">

          
                <div class="form-group">
                	<label for="name-field">Name</label>
                	<input class="form-control" type="text" name="name" id="name-field" value="{{ old('name', $tag->name ) }}" />
                </div> 
                <div class="form-group">
                	<label for="outhername-field">Outhername</label>
                	<input class="form-control" type="text" name="outhername" id="outhername-field" value="{{ old('outhername', $tag->outhername ) }}" />
                </div> 
                <div class="form-group">
                	<label for="seotitle-field">Seotitle</label>
                	<input class="form-control" type="text" name="seotitle" id="seotitle-field" value="{{ old('seotitle', $tag->seotitle ) }}" />
                </div> 
                <div class="form-group">
                	<label for="url-field">Url</label>
                	<input class="form-control" type="text" name="url" id="url-field" value="{{ old('url', $tag->url ) }}" />
                </div>

          <div class="well well-sm">
            <button type="submit" class="btn btn-primary">Save</button>
            <a class="btn btn-link float-xs-right" href="{{ route('tags.index') }}"> <- Back</a>
          </div>
        </form>
      </div>
    </div>
  </div>
</div>

@endsection
